Skip to content

fix: Windows agent start, unsaved work on linked open, packaged clip list, engine cleanup - #21

Merged
nodemode-ai merged 8 commits into
mainfrom
fix/review-2026-11-28
Nov 29, 2026
Merged

nodemode-ai merged 8 commits into
mainfrom
fix/review-2026-11-28

Conversation

@gbarnai

@gbarnai gbarnai commented Nov 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • On Windows, an npm .cmd shim for an agent program is now resolved to its target and run directly: the target .exe, or the .js with node.exe beside the shim or in a full-path folder on the child PATH. The command interpreter is no longer used, so prompt words reach the program unchanged.
  • Any other .cmd or .bat still goes through cmd /c. Words it would change or treat as part of the command are refused with a clear error: control characters, percent signs, double quotes, and unquoted special characters. The shared agent finder is now 1.0.2 and its hash is recorded.
  • When Agent link is on and another app pushes a .frig without the window token, it is refused with 409 if the open project has unsaved changes, because opening a project clears the undo history. Imports and opens from the window are unchanged.
  • The MCP resource formrig://library/clips and /api/library/clips now share one clip lookup, so packaged builds list the bundled clips. Missing entries and entries outside the clips folder are skipped.
  • When the app exits, the engine's parent watch now runs the normal service shutdown first: engine.json is removed, and terminals and agent config files are closed.
  • If a left-over engine.json names a closed port, the Unreal and Unity receivers start FormRig instead of waiting for it.
  • Known limit: quitting on Windows still hard-kills the engine, so engine.json can be left behind there. The receivers now cope with that file.
  • Test plan: backend pytest 917 passed, frontend 853 passed, cargo test 145 passed, clippy clean. The Unity C# change and the Windows paths are not tested on Windows yet.
  • Windows: when a .cmd or .bat program still has to run through the command interpreter, any argument (the script path included) that contains one of & | < > ^ ( ) ! % or a double quote, or a control character, is refused even when it contains spaces. The message suggests passing long text through standard input or a file. npm shims keep running node or the wrapped exe directly, with no command interpreter.
  • Unit tests cover the direct shim path and the strict refusal path, using a fake Windows environment that runs on any OS.

Tests

  • Each fix has a test that fails on the previous code where practical.
  • The repo CI commands were run locally on macOS. Every failure seen locally also fails on main in the same environment (missing local tools or platform-specific tests); none is introduced here.
  • Please rely on this PR's CI run for Linux and Windows.

For the owner

  • A few related items need an owner decision; they are listed separately, not here.

How to ship

  • Independent of other repos; merge in any order. No version bump; release as usual.

A .cmd or .bat that only starts a program is replaced by that program,
run directly. Other scripts still go through cmd /c, and words the
command interpreter would read as part of the command are refused.
The shared finder is 1.0.2 with its hash recorded.
load_rig of a .frig without the window token is refused with 409
while the open project has unsaved changes, since opening a project
clears the undo history. Imports stay undoable and are unchanged.
The MCP clip resource and the window's clip route share one lookup,
which finds the clips bundled into a frozen engine and skips entries
that are missing or outside the clips folder.
The parent watch runs the service shutdown, which removes engine.json
and closes terminals, before the engine exits.
… closed port

Unreal and Unity treat a refused connection as FormRig not running
and go on to start the configured app instead of waiting.
The node found on the child PATH for an npm shim must be node.exe in a
full-path folder; a node.cmd or node.bat, a relative entry or the
current folder are skipped. A script ending is matched with trailing
dots and spaces dropped. The finder 1.0.2 hash is updated.
…cript word

When a .cmd or .bat still has to go through the command interpreter,
any word, the script path included, that holds one of & | < > ^ ( ) ! %
or a double quote, or a control character, is refused whether or not it
holds spaces. The message points to standard input or a file for long
text. The finder 1.0.2 hash is updated.
@gbarnai
gbarnai requested a review from nodemode-ai as a code owner November 29, 2026 18:19
@nodemode-ai
nodemode-ai merged commit b89b4c4 into main Nov 29, 2026
6 checks passed
@nodemode-ai
nodemode-ai deleted the fix/review-2026-11-28 branch November 29, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants